 function loadResearchList(tabVal, id, showTabs, showSingleUserTab)
 {
     // showTabs flag determines to show/hide tabs
     // As we dont need tabs at userProfile screen so that screen passes 0 to this function
     // But at home page we need
     // 1 ==> TRUE, 0 ==> FALSE
     var $url = '';
     if(showTabs)
         $url = "http://"+location.hostname+"/publication/loadpublications?uid=" + id + "&tid=" + tabVal + "&st=" + showTabs;
     else
         $url = "http://"+location.hostname+"/publication/loadpublications?uid=" + id + "&tid=" + tabVal;

     if(showSingleUserTab)
         $url += ("&showUserTab=" + showSingleUserTab);
    
    $.post($url, {}, function(data) {
        $('#tdResearchList').html( data);
    });
 }

function loadMessage(mid)
{
    window.location.href = "http://"+location.hostname + '/home/messageDetail?id=' + mid;

    return false;
}

function verifyUserCollaboration(rid, uid)
{
    clearErrorMessage();
    $url = "http://"+location.hostname+"/home/verifyUserCollaboration?rid=" + rid + "&uid=" + uid;
    
    $.post($url, {}, function(data) {
        if(data == '1')
        {
            window.location.href = "http://"+location.hostname + '/data/editResearch?id=' + rid;
        }
        else
        {
            $('#tdError').html( '<span class=\'redFont\' align=\'center\'>You are not allowed to view this research</span>' );

        }
    });
}

function clearErrorMessage()
{
    $('#tdError').html( '<span class=\'redFont\' align=\'center\'>&nbsp;</span>' );

}